import java.util.Date
import java.text.DateFormat
import java.text.SimpleDateFormat

class TimeUtilService {

    boolean transactional = true

    def serviceMethod() {

    }

    def stringToDate(stringDate){
        def tokeDate = stringDate.tokenize('-')
        log.info(tokeDate)
        if(tokeDate && tokeDate.size() == 3){
            return new Date(tokeDate[0].toInteger()-1900, tokeDate[1].toInteger()-1, tokeDate[2].toInteger())    
        }else{
            return new Date()
        }
    }
}
